package com.mi.system.dto.request;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * Dict request DTO
 *
 * @author jin_huaquan
 * @version 1.0
 * @date 2021/11/2 15:39
 */
@ApiModel(value = "DictRequestDTO对象", description = "字典请求信息")
@Data
public class DictRequestDTO {

    @ApiModelProperty(value = "字典类型", required = true)
    @NotBlank(message = "字典类型不能为空")
    @Length(min = 1, max = 100, message = "字典类型不能超过100个字符")
    private String type;

    @ApiModelProperty("字典类型描述")
    @Length(max = 100, message = "字典类型描述不能超过100个字符")
    private String description;

    @ApiModelProperty(value = "是否为系统内置 @enum DictSystem[0(否),1(是)]", required = true)
    @NotNull(message = "是否为系统内置选项不能为空")
    @Range(min = 0, max = 1, message = "非法的是否为系统内置值")
    private Integer system;

    @ApiModelProperty("字典类型备注信息")
    @Length(max = 128, message = "字典类型备注信息不能超过128个字符")
    private String remarks;
}
